package com.hq.door.dto;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import com.hq.door.pojo.TOutRequest;
import com.hq.door.pojo.TRecords;
import com.hq.door.pojo.TStudent;
public class TRecordInfo {
	private Integer id;
    private String cardNo;
    private String studentName;
    private Timestamp createTime;
    private Integer inoutType;
    private Integer isException;
    
    
    
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCardNo() {
		return cardNo;
	}
	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getStudentName() {
		return studentName;
	}
	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}
	public Timestamp getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	public Integer getInoutType() {
		return inoutType;
	}
	public void setInoutType(Integer inoutType) {
		this.inoutType = inoutType;
	}
	public Integer getIsException() {
		return isException;
	}
	public void setIsException(Integer isException) {
		this.isException = isException;
	}
	@Override
	public String toString() {
		return "TRecordInfo [id=" + id + ", cardNo=" + cardNo
				+ ", studentName=" + studentName + ", createTime=" + createTime
				+ ", inoutType=" + inoutType + ", isException=" + isException
				+ "]";
	}
    
	public void getTRecord(TRecords tRecords){
		this.id=tRecords.getId();
		this.cardNo=tRecords.getCardNo();
		this.createTime=tRecords.getCreateTime();
		this.inoutType=tRecords.getInoutType();
		this.isException=tRecords.getIsException();
	}
	
	public List<TRecordInfo> getTOutrequest(List<TRecords> tRecords) {
		List<TRecordInfo> recordInfos = new ArrayList<TRecordInfo>();
		for (int i = 0; i<tRecords.size();i++) {
			TRecords tRecord =tRecords.get(i);
			TRecordInfo tRecordInfo = new TRecordInfo();
			tRecordInfo.getTRecord(tRecord);
			recordInfos.add(tRecordInfo);
		}
		return recordInfos;
	}
    
    
}
